CTC++
Testwell CTC++ is an instrumentation-based code coverage and dynamic analysis tool for C and C++ code.
As a code coverage tool, CTC++ shows the coverage all the way to the Modified Condition/Decision Coverage (MC/DC) level as required by DO-178C projects.
As a dynamic analysis tool, CTC++ shows the execution counters in the code, that is more than plain Boolean coverage information.
How to configure CTC++ with the lights control example and the EXE platform:
-
Install CTC++. Make sure you have a valid CTC++ installation before using it with TPT.
-
You can specify the CTC++ installation directory directly in Options | Preferences | CTC++ instead of adding the path manually to the Windows variables.
-
Compile with CTC++ to instrument the target code:
ctc -i m -C EXCLUDE+<TPT-Wrapper code>.c gcc -DGCC_WIN -I. -L. <TPT-Wrapper code>.c <target code>.c tptvmapi.lib -o <TargetName>.exe
-
Once compiled, a symbol file
MON.sym
is created. -
Open the
Parallel Automatons (GUI Assessment).tpt
file located in the examples folder.
When you run the tests in TPT on the EXE Platform, and open the test report, you will have access to a Coverage Summary section in the Overview report. The untested code section shows which part of the test was not tested. Click untested code to open the section.
CTC++ Options
function
Enables coverage data import and CTC++ report generation for function coverage.
statement
Enables coverage data import and CTC++ report generation for statement coverage.
decision
Enables coverage data import and CTC++ report generation for decision coverage.
condition
Enables coverage data import and CTC++ report generation for condition coverage.
MC/DC
Enables coverage data import and CTC++ report generation for MC/DC coverage.
multicondition
Enables coverage data import and CTC++ report generation for multicondition coverage.
Enable annotations for report generation
Enables annotations for CTC++ html report generation by adding the "--enable-annotations" option to the ctc2html command.